home *** CD-ROM | disk | FTP | other *** search
/ Mac100% 1998 November / MAC100-1998-11.ISO.7z / MAC100-1998-11.ISO / オンラインソフト定点観測 / ユーティリティ / CDFinder 2.1.1.sit / CDFinder 2.1.1 / CDFinder & AppleScript < prev    next >
Text File  |  1997-07-24  |  1KB  |  32 lines

  1. -- New in CDFinder 2.1.1:
  2. --  ・ You can now set a new name and an initial comment while creating a new catalog!
  3.  
  4. --  This is a short sample how to tell CDFinder to create catalog files of all local disks
  5. --  By Norbert M. Doerner 1998
  6.  
  7. tell application "Finder"
  8.     set volumeList to every disk as list
  9. end tell
  10.  
  11. tell application "CDFinder"
  12.     repeat with oneDisk in volumeList
  13.         set oneAlias to oneDisk as alias --  CDFinder needs an alias of the disk
  14.         with timeout of 500 seconds --  remember: this might take more than the two minutes!
  15.             set myResult to create catalog of (oneAlias) --  use standard settings and do not update or duplicate
  16.         end timeout
  17.         if myResult = -128 then -- then the catalog might be already there
  18.         end if
  19.     end repeat
  20. end tell
  21.  
  22. --  PLEASE NOTE:
  23. --  This is the first release of CDFinder with some AppleScript support. Once I have figured out
  24. --  how to add more stuff (like a real object hierarchy) I will add more options.
  25. --  If you have any ideas or suggestions or even better, code samples, please tell me!
  26.  
  27. --  Secret commands:
  28. --  By opening the preferences file, CDFinder will open the window to let you change the preferences.
  29. --  By opening any catalog file that is stored inside the catalog folder, CDFinder will open it
  30. --    and display its contents.
  31. --  These secret commands will go away once I figure out how to use properties and the 
  32. --   get/set data commands.